package com.lanou.demo.backgrounddemo.mapper;


import com.lanou.entity.entity.ItemCatEntity;
import com.lanou.entity.entity.ItemDescEntity;
import com.lanou.entity.entity.ItemEntity;
import com.lanou.entity.entity.ItemParamItemEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 常宏盛
 * Date: 2019/7/11 11:02
 **/
public interface ItemMapper {

    int count();

    List<ItemEntity> list(@Param("offset") int offset, @Param("rows") int rows);

    int itemSave(ItemEntity item);

    int itemDescSave(@Param("desc") String desc, @Param("id") Long id);

    int itemParamSave(@Param("id") Long id, @Param("itemParams") String itemParams);

    int delete(List<Long> idsList);

    void instock(List<Long> instockIdsList);

    void reshelf(List<Long> reshelfIdsList);

    List<ItemEntity> itemStatusList(List<Long> idsList);

    ItemDescEntity itemDesc(Long id);

    ItemParamItemEntity itemParam(Long id);

    List<ItemCatEntity> itemCatList(Long parentId);

    int update(ItemEntity item);

    int updateItemParamData(@Param("itemParams") String itemParams, @Param("itemParamId") Long itemParamId);

}
